package natappvip.liujinliang.jedis;

import redis.clients.jedis.Jedis;

/**
 * @ClassName:  JedisUtil   
 * @Despt: Jedis工具类  
 * @Auth: Liujinliang 
 * @Date: 2018年7月29日 下午9:38:08
 */
public class JedisUtil {
	
	public static void set(String key, String value) {
		Jedis jedis = JedisConnectionPool.getJedis();
		jedis.set(key, value);
		JedisConnectionPool.freeJedis(jedis);
	}
	
	public static String get(String key) {
		Jedis jedis = JedisConnectionPool.getJedis();
		String res = jedis.get(key);
		JedisConnectionPool.freeJedis(jedis);
		return res;
	}
	
}
